Public Class HtmlEditor
    Inherits System.Web.UI.UserControl
    Protected script As String

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub
    Protected WithEvents editor As System.Web.UI.HtmlControls.HtmlTextArea

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        script = "<script language=""javascript"">" & _
         " var editor = new HTMLArea(""" & editor.UniqueID.Replace("$", "_") & """); " & _
" editor.generate();" & _
"</script>"
        '" editor.registerPlugin(ContextMenu); " & _
        '        " editor.registerPlugin(TableOperations); " & _
         
    End Sub

    Public Function getKeyValue() As Object
        Return editor.InnerText
    End Function

    Public Sub setKeyValue(ByVal value As Object)
        editor.InnerText = value
    End Sub

    Public Property InnerHTML() As String
        Get
            Return editor.InnerText
        End Get
        Set(ByVal Value As String)
            editor.InnerText = Value
        End Set
    End Property

    Public Property Cols() As Integer
        Get
            Return editor.Cols
        End Get
        Set(ByVal Value As Integer)
            editor.Cols = Value
        End Set
    End Property

    Public Property Rows() As Integer
        Get
            Return editor.Rows
        End Get
        Set(ByVal Value As Integer)
            editor.Rows = Value
        End Set
    End Property
End Class
